package com.zbkj.crmeb.marketing.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.common.PageParamRequest;
import com.zbkj.crmeb.enums.CouponUserTypeEnum;
import com.zbkj.crmeb.marketing.model.StoreCoupon;
import com.zbkj.crmeb.marketing.request.StoreCouponRequest;
import com.zbkj.crmeb.marketing.request.StoreCouponSearchRequest;
import com.zbkj.crmeb.marketing.response.StoreCouponInfoResponse;
import com.zbkj.crmeb.store.model.StoreCouponUserPhone;

/**
 * 优惠券
 * @author daigb
 * @date:  2022-01-17 13:59
 */
public interface StoreCouponService extends IService<StoreCoupon> {
	
	/**
	 * 保存
	 * @author daigb
	 * @date:  2022-01-17 16:39
	 */
	Boolean saveEntity(StoreCouponRequest request);

	/**
	 * 分页
	 * @author daigb
	 * @date:  2022-01-17 16:39
	 */
    List<StoreCoupon> pageEntity(StoreCouponSearchRequest request, PageParamRequest pageParamRequest);
    
    /**
     * 列表
     * @author daigb
     * @date:  2022-01-17 16:40
     */
    List<StoreCoupon> listEntity(StoreCouponSearchRequest request);

    /**
     * 详情
     * @author daigb
     * @date:  2022-01-17 16:40
     */
    StoreCouponInfoResponse info(Integer id);
    
    /**
     * 用户领取优惠券(所有用户领券都调用此接口)
     * @author daigb
     * @date:  2022-01-17 16:40
     */
    Boolean bindCouponByUser(List<Integer> userIds, Integer couponId, CouponUserTypeEnum type);
    
    /**
     * 新用户注册发放优惠券
     * @author daigb
     * @date:  2022-01-17 16:40
     */
    void bindCouponByRegisterUser(Integer userId);
    
    /**
     * 优惠券是否可用(判断优惠券自身是否已失效)
     * @author daigb
     * @date:  2022-01-17 16:40
     */
    Boolean checkCoupon(Integer couponUserId);

    /**
     * 功能描述: 获取优惠券指定手机号客户成功/失败手机号信息
     * @Param: [id, status]
     * @Return: java.util.List<com.zbkj.crmeb.store.model.StoreCouponUserPhone>
     * @Author: wangzh
     * @Date: 2023/3/27 11:01
     */
    List<StoreCouponUserPhone> getPhoneInfos(Integer id, Boolean status);

    /**
     * 功能描述: 自动发放优惠券定时任务
     * @Param: []
     * @Return: void
     * @Author: wangzh
     * @Date: 2023/3/28 15:08
     */
    void bindCouponBySystem();

}
